//: BigEgg.java 
// An inner class cannot be overriden 
// like a method 

class Egg {

    protected class Yolk {

        public Yolk() {
            System.out.println("Egg.Yolk()");
        }
    }
    protected Yolk y;

    public Egg() {
        System.out.println("New Egg()");
        y = new Yolk();
    }
}

public class BigEgg extends Egg {
    public BigEgg(){
        y = new Yolk();
    }
    /*
    public class Yolk {

        public Yolk() {
            System.out.println("BigEgg.Yolk()");
        }
    }*/

    public static void main(String[] args) {
        new BigEgg();
    }
} ///:~ 
